package com.sskj.gocoin.p.activity;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.gocoin.m.HttpConfig;
import com.sskj.gocoin.m.bean.HttpData;
import com.sskj.gocoin.m.http.JsonCallBack;
import com.sskj.gocoin.p.base.BasePresenter;
import com.sskj.gocoin.v.activity.WKActivity;

public class WKPresenter extends BasePresenter<WKActivity> {

    public void getData() {
        OkGo.<HttpData<WKEntry>>get(HttpConfig.BASE_URL + HttpConfig.WKINFO)
                .execute(new JsonCallBack<HttpData<WKEntry>>() {
                    @Override
                    protected void _onSuccess(Response<HttpData<WKEntry>> response) {
                        mView.setData(response.body().getData());
                    }
                });
    }
}
